using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Services.Identity.Domain.Entities;

namespace Services.Identity.Infrastructure.Configs;
public class UserConfig : IEntityTypeConfiguration<User>
{
    public void Configure(EntityTypeBuilder<User> builder)
    {
        builder.ToTable("T_Users");
        builder.HasKey(x => x.Id).IsClustered();
        builder.Property(x => x.Id).UseHiLo();
        builder.HasQueryFilter(x => x.IsDeleted == false);
    }
}